package com.neusoft.tijiancms.mapper;

import com.neusoft.tijiancms.dto.OrdersPageRequestDTO;
import com.neusoft.tijiancms.dto.OrdersPageResponseDTO;
import com.neusoft.tijiancms.po.Orders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface OrdersMapper {
  /**
   * 分页查询体检预约列表
   * @param ordersPageRequestDTO
   * @return
   */
  public List<Orders> listOrders(OrdersPageRequestDTO ordersPageRequestDTO);

  /**
   *根据条件查询订单总行数
   * @param ordersPageRequestDTO
   * @return
   */
  public int getOrdersCount(OrdersPageRequestDTO ordersPageRequestDTO);

  /**
   * 根据orderId查询单个用户信息
   * @param orders
   * @return
   */
  public Orders getOrderById(Orders orders);

  /**
   * 根据orderId更改状态
   * @param orders
   * @return
   */
  @Update("update orders set state=#{state} where orderId=#{orderId}")
 public int updateOrdersState(Orders orders);


}
